lib/checkout: Ignore world-writable dirs for bare-user-only checkout
authorColin Walters <walters@verbum.org>
Wed, 7 Jun 2017 18:21:59 +0000 (14:21 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 12 Jun 2017 14:24:22 +0000 (14:24 +0000)
commit8edb5161dbf9a94734baeb0332b367fe66aafbe4
tree87f19bcd2b79bb6143be4869af2a2c6bfa89cdfc
parent18ae8e5267f35394faa41cdeadd5125962ba9417
lib/checkout: Ignore world-writable dirs for bare-user-only checkout

See https://github.com/ostreedev/ostree/pull/909 for more information on the
rationale. Basically there's no reason for flatpak (which uses `bare-user-only`)
to have world-writable dirs. Particularly with the presence of the system
helper.

An approach I considered instead was to parse and validate directory metadata
objects at commit time. We still may do that in addition; for file objects we *had*
to do it that way because the actual files would be laid down suid.  But directories
live only as inert `.dirmeta` objects until we do a checkout (i.e. `mkdir()`), so
we can solve the problem at checkout time.

Closes: #914
Approved by: alexlarsson
src/libostree/ostree-repo-checkout.c
tests/test-basic-user-only.sh